<?php
defined('IN_MAIN') or exit('Invalid Access!');

function build_multiple_select($value, $display_value, $selected, $name, $extra=""){
$r_selected = explode(",",$selected);
for($i=0;$i<count($value);$i++){
 $sel="";
 if(in_array($value[$i], $r_selected)){
  $sel="selected";
 }
 $sel_option.="<option value=\"$value[$i]\" $sel>".$display_value[$value[$i]]."</option>";
}
$select="<select name=$name multiple $extra>$sel_option</select>";
return $select;
}
?>